<?php
/**
 * Created by JetBrains PhpStorm.
 * User: Đặng Khánh Trung
 * Date: 11/2/12
 * Time: 11:33 AM
 * To change this template use File | Settings | File Templates.
 */
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
$type = JRequest::getInt('type', 0);

$phong = $this->get('phong');
$donvis = $this->get('donvi');
if (count($donvis) > 1)
    $donvi = $donvis[0];
elseif (count($donvis) == 1)
    $donvi = $donvis;
$khoi = $this->get('khoi');

$phonglanhdao = VastHelper::getPhongLanhDao();
if (!($phonglanhdao->phongid == JRequest::getInt('phongid')))
{
    JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_vast&view=vast'));                
}

?>

<div id="crumbs">
    <div style="color: #222222;font-weight: normal;margin: 0;padding: 0">
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=vast') ?>">Trang chủ</a> »
        <span>Cơ cấu tổ chức</span> »
        <?php if (isset($khoi)): ?>        
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=donvitructhuoc&id=' . $khoi->id); ?>"><?php echo $khoi->ten ?></a> »                
        <?php endif; ?>
        <?php if (isset($donvi)): ?>
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=phongtructhuocs&id=' . $donvi->id); ?>"><?php echo $donvi->ten ?></a> »
        <?php endif; ?>
        <?php if (isset($phong)): ?>
        <a href="<?php echo JRoute::_('index.php?option=com_vast&view=chitietphong&id=' . $phong->id); ?>"><?php echo $phong->ten ?></a> »        
        <?php endif; ?>
        <span>Xác lập báo cáo</span>
    </div>
</div>

<div id="main" class="home">
    <h3 class="title green">Tạo một số mẫu báo cáo cho cán bộ lãnh đạo viện</h3>

    <div class="search-form">
        <div class="wide form">
            <form id="commentform" class="commentform" class="form-validate" method="post" action="index.php?option=com_vast&view=baocaophong&phongid=<?php echo JRequest::getInt('phongid'); ?>">
            
                <div class="row">
                    <label style="text-align: left;">Loại báo cáo</label>		
                    <select style="width: 35%;" name="baocaoLoai" id="baocaoLoai">
                            <option value="0" selected="selected">-Hãy chọn loại báo cáo-</option>
                            <option value="1">Danh sách cán bộ đến tuổi về hưu</option>
                            <option value="2">Danh sách cán bộ được khen thưởng</option>
                    </select>
                </div>
                
                <div class="row buttons">
                    <input type="hidden" name="option" value="com_vast" />
                    <input type="hidden" name="view" value="baocaophong" />
                    <input type="hidden" name="task" value="baocaophong.submit" />
                    <input id="submit" value="Chọn báo cáo" type="submit"/>	
                    <?php echo JHtml::_('form.token'); ?>
                </div>
    
            </form>
        </div>
    </div>
    
    <div style="float: left; width: 680px; margin-top: 5px;">
        <?php
        $url = htmlspecialchars($_SERVER['HTTP_REFERER']);
        echo '<a title="Quay lại" href="' . $url . '"><span style="left: 610px; position: relative;">&laquo; Quay lại</span></a>';
        ?>    
    </div>    
</div>